using System;
using System.Collections.Generic;
using System.Text;

namespace Tarea5
{
    interface ControllerInterface
    {
        /// <summary>
        /// Changes the model and notifies all registered views.
        /// </summary>
        /// <param name="behavior"></param>
        /// <param name="sleepInterval"></param>
        /// <param name="initialBoard"></param>
        void SetModel(Behaviors.Behavior behavior, int sleepInterval, short[,] initialBoard);

        int MoveCell(int row, int col);

        int UnDoMoveCell();

        /// <summary>
        /// Start command.
        /// </summary>
        void Start();

        /// <summary>
        /// Pause command.
        /// </summary>
        void Pause();

        /// <summary>
        /// Stop command.
        /// </summary>
        void Stop();

        /// <summary>
        /// Sets the idle interval between each action.
        /// </summary>
        /// <param name="sleepInterval">idle interval between each action, expressed in miliseconds</param>
        void SetSleepInterval(int sleepInterval);

        /// <summary>
        /// Tells if the model is running.
        /// </summary>
        /// <returns>true if the model is running, false otherwise</returns>
        bool IsRunning();

        /// <summary>
        /// Tells if the model is stopped after running.
        /// </summary>
        /// <returns>true if the model is stopped, false otherwise</returns>
        bool IsStopped();

        /// <summary>
        /// Tells if the model is paused while running.
        /// </summary>
        /// <returns>true if the model is stopped, false otherwise</returns>
        bool IsPaused();

        /// <summary>
        /// Register a view object for updates about this object.
        /// </summary>
        /// <param name="o">the observer object</param>
        void RegisterView(ViewInterface o);

        /// <summary>
        /// Unregister a view object for updates about this object.
        /// </summary>
        /// <param name="o">the observer object</param>
        void RemoveView(ViewInterface o);
    }
}
